﻿@using QDT.Core
@using QDT.Core.Domain
@using QDT.Core.Members
@model QDT.Core.Members.User
@{
    var bank = ViewData["bank"] as UserBank;
    var banks = ViewData["Banks"] as ICollection<Bank>;
}
<div class="blank5">
</div>
@using (Html.BeginForm("PostEditUser", "Business"))
{
    <div class="blank5">
    </div>
    @Html.HiddenFor(x => x.ID)
    <table class="form">
        <tr>
            <td colspan="2" class="topTd">
            </td>
        </tr>
        <tr>
            <td colspan="2" class="item_title" style="text-align: center;">
                <b>身份信息</b>
            </td>
        </tr>
        <tr>
            <td class="item_title">
                会员名称:
            </td>
            <td class="item_input">
                @Model.UserName
            </td>
        </tr>
        <tr>
            <td class="item_title">
                会员邮件:
            </td>
            <td class="item_input">
                @Model.Email
            </td>
        </tr>
        <tr>
            <td class="item_title">
                手机号:
            </td>
            <td class="item_input">
                <input type="text" class="textbox" name="Mobile" value="@Model.Mobile"/>
            </td>
        </tr>
        <tr>
            <td class="item_title">
                会员密码:
            </td>
            <td class="item_input">
                <input type="password" class="textbox" name="Password" />
            </td>
        </tr>
        <tr>
            <td class="item_title">
                确认密码:
            </td>
            <td class="item_input">
                <input type="password" class="textbox" name="ConfrimPassword" />
            </td>
        </tr>
        <tr>
            <td class="item_title">
                安全密码:
            </td>
            <td class="item_input">
                <input type="password" class="textbox" name="SafePassword" />
            </td>
        </tr>
        <tr>
            <td class="item_title">
                确认安全密码:
            </td>
            <td class="item_input">
                <input type="password" class="textbox" name="ConfrimSafePassword" />
            </td>
        </tr>
        <tr>
            <td class="item_title">
                所属部门:
            </td>
            <td class="item_input">
                <select name="DepartmentBelong" id="sltDepartmentBelong">
                    <option value="0" @(Model.DepartmentBelong.Equals(0) ? "selected=selected" : "") >请选择</option>
                    <option value="1" @(Model.DepartmentBelong.Equals(1) ? "selected=selected" : "")>营业一部</option>
                    <option value="2" @(Model.DepartmentBelong.Equals(2) ? "selected=selected" : "")>营业二部</option>
                    <option value="3" @(Model.DepartmentBelong.Equals(3) ? "selected=selected" : "")>遵义营业部</option>
                    <option value="4" @(Model.DepartmentBelong.Equals(4) ? "selected=selected" : "")>毕节营业部</option>
                    <option value="5" @(Model.DepartmentBelong.Equals(5) ? "selected=selected" : "")>毕节营业部</option>
                </select>
            </td>
        </tr>

        <tr>
            <td class="item_title">
                姓名:
            </td>
            <td class="item_input">
                <input type="text" class="textbox" name="RealName" value="@Model.RealName" />
            </td>
        </tr>
        <tr>
            <td class="item_title">
                身份证号码:
            </td>
            <td class="item_input">
                <input type="text" class="textbox" name="IDCard" value="@Model.IDCard" />
            </td>
        </tr>
        <tr>
            <td class="item_title">
                身份证验证:
            </td>
            <td class="item_input">
                <input type="radio"  name="IDCardPassed" value="true" @(Model.IDCardPassed ? "checked" : "")/>已通过
                <input type="radio"  name="IDCardPassed" value="false" @(Model.IDCardPassed ? "" : "checked")/>未通过
            </td>
        </tr>
        <tr>
            <td class="item_title">
            </td>
            <td class="item_input">
                <input type="submit" class="button" value="编辑" />
                <input type="reset" class="button" value="重置" />
            </td>
        </tr>
        <tr>
            <td colspan="2" class="bottomTd">
            </td>
        </tr>
    </table>
}

<div class="blank5">
</div>
@using (Html.BeginForm("PostEditUserBank", "Business"))
{
    <div class="blank5">
    </div>
    <table class="form">
        <tr>
            <td colspan="2" class="topTd">
            </td>
        </tr>
        <tr>
            <td colspan="2" class="item_title" style="text-align: center;">
                <b>用户银行卡信息</b>
            </td>
        </tr>
        <tr>
            <td class="item_title">
                持卡人:
            </td>
            <td class="item_input">
                @(Model.IDCardPassed ? Model.RealName : "请先实名认证")
            </td>
        </tr>
        <tr>
            <td class="item_title">
                卡号:
            </td>
            <td class="item_input">
                <input type="hidden" name="UserId" value="@Model.ID"/>
                <input type="text" class="textbox" id="BankCard" name="BankCard" value="@bank.BankCard" style="width:180px"/>
            </td>
        </tr>
        <tr>
            <td class="item_title">
                银行:
            </td>
            <td class="item_input">
                <select class="textbox" id="BankId" name="BankId" style="width: 180px;">
                    @foreach (var b in banks)
                    {
                        <option value="@b.ID" @(b.ID == bank.BankId ? "selected=selected" : "")>@b.Name</option>
                    }
                </select>
            </td>
        </tr>
        <tr>
            <td class="item_title">
                开户城市:
            </td>
            <td class="item_input">
                <input id="RegionLv2" name="RegionLv2" class="textbox" style="width: 80px;" value="@Html.F().GetRegionById(bank.RegionLv2)"/> 省
                <input id="RegionLv3" name="RegionLv3" class="textbox" style="width: 80px;" value="@Html.F().GetRegionById(bank.RegionLv3)"/> 市
            </td>
        </tr>
        <tr>
            <td class="item_title">
                开户网点:
            </td>
            <td class="item_input">
                <input type="text" id="BankZone" name="BankZone" class="textbox" style="width:180px" value="@bank.BankZone"/>
            </td>
        </tr>
        <tr>
            <td class="item_title">
            </td>
            <td class="item_input">
                <input type="submit" class="button" value="编辑" />
                <input type="reset" class="button" value="重置" />
            </td>
        </tr>
        <tr>
            <td colspan="2" class="bottomTd">
            </td>
        </tr>
    </table>
}

